<?php /* Smarty version 2.6.16, created on 2012-10-11 14:27:45
         compiled from edit_profile.tpl */ ?>
<?php echo '
<script language="javascript" src="js/contact_us.js"></script>
   

<script language="javascript">
var $ = jQuery.noConflict();

function CheckFields()
{
   /*if($("#rate").isEmpty())
    	 $("#rate").attr(\'style\',\'border:1px solid #FF0000\');*/
   if(document.getElementById(\'user_type\').value==1)	{ 		 	 		 		 		 		 
	  if(!$("#paypal_email_id").emailCheck() || document.getElementById(\'paypal_email_id\').value==\'\' ) 
	   {
		$(\'#FormErrorMsg\').show();
		$(\'#FormErrorMsg\').html("Please Enter a Valid paypal email");
		return false;
	   }
   }
  if(document.getElementById(\'user_type\').value==2)	{ 		 	 		 		 		 		 
	  if(document.getElementById(\'rate\').value==\'\' ) 
	   {
		
		$(\'#FormErrorMsg\').show();
		$(\'#FormErrorMsg\').html("Please Enter a Valid budget");
	
		return false;
	   }
  }
  if(document.getElementById(\'name\').value==\'\')
   {
    $(\'#FormErrorMsg\').show();
    $(\'#FormErrorMsg\').html("Please enter your name");
	//$(\'#FormErrorMsg\').fadeOut(2000);
    return false;
   }
  
   if(document.getElementById(\'city\').value==\'\')
   {
    $(\'#FormErrorMsg\').show();
    $(\'#FormErrorMsg\').html("Please enter city");
	//$(\'#FormErrorMsg\').fadeOut(2000);
    return false;
   }     
  
   if(document.getElementById(\'avail_L\') && document.getElementById(\'avail_L\').checked == true)
   {
      if(document.getElementById(\'availability_city\').value==\'\')
	  {
	    $(\'#FormErrorMsg\').show();
		$(\'#FormErrorMag\').html("Please enter city");
		$(\'#availability_city\').attr(\'style\',\'border:1px solid #FF0000\');
		return false; 
	  }	
	 
   }	
   if(document.getElementById(\'is_coach\').value==1)
   {
        if(!$("#paypal_email_id").emailCheck() || document.getElementById(\'paypal_email_id\').value==\'\' ) 
		   {
				$(\'#FormErrorMsg\').show();
				$(\'#FormErrorMsg\').html("Please Enter a Valid paypal email");
				$("#paypal_email_id").attr(\'style\',\'border:1px solid #FF0000\');
				return false;
		   }
     
   }
   if($(\'#Upload\').val()!=\'\')
  {
    //check it\'s extension
	 var status1,status2,status3,status4;
	 var str = $(\'#Upload\').val();
	 str = str.toLowerCase(); 
	 status1 = str.indexOf(\'.jpg\'); 
	 status2 = str.indexOf(\'.jpeg\'); 
	 status3 = str.indexOf(\'.gif\'); 
	 status4 = str.indexOf(\'.png\'); 
    if(status1== -1 && status2== -1 && status3== -1 && status4== -1 ) 
	{
		$(\'#FormErrorMsg\').show();
		$(\'#FormErrorMsg\').html("* Wrong Image Format.");
		//$(\'#FormkErrorMsg\').fadeOut(3000);
		$(\'#Upload\').val(\'\');
		return false;
    }
	//Check Image Size
	
  }
  document.getElementById("editprofileForm").submit();
  //return true;
 
}
function showhide_div()
{
	var chk = document.getElementById(\'avail_L\').checked == true
	if(document.getElementById(\'avail_L\').checked == true)
	{  
	  $(\'#avail_city\').show();
	  $(\'#availability_city\').show();
	 
	}
	if(document.getElementById(\'avail_L\').checked == false)
	{  		
	  $(\'#avail_city\').hide();
	  $(\'#availability_city\').hide();
	}  			
} 
function keyCheck(eventObj, obj)
{
    var keyCode
 
    // Check For Browser Type
    if (document.all){
        keyCode=eventObj.keyCode
    }
    else{
        keyCode=eventObj.which
    }
  //alert(keyCode)
    var str=obj.value
 
    if(keyCode==46){
        if (str.indexOf(".")>0){
            return false
        }
    }
 
    if((keyCode<46 || keyCode >57)   &&   (keyCode >31)){ // Allow only integers and decimal points
        return false
    }
    
    return true
}


function limitText(limitField, limitCount, limitNum) {
	if (limitField.value.length > limitNum) {
		limitField.value = limitField.value.substring(0, limitNum);
	} else {
		limitCount.value = limitNum - limitField.value.length;
	}
}


   
</script>

'; ?>

<div align="right">
	<?php if ($this->_tpl_vars['is_coach'] == '0'): ?>
	<!--label>Become a Coach :</label> <input type="radio" name="user_type" value="1" onclick="coach_game()" /-->
	<a class="button" href="coach_game_update.php?profile=Y"><span>Become a Coach</span></a>
	<?php endif; ?>
	<?php if ($this->_tpl_vars['is_partner'] == '0'): ?>
	<a class="button" href="training_partner_game_update.php?profile=Y">Become Training Partner</a>
	<!--label>Become a Training Partner :</label> <input type="radio" name="user_type" value="3" onclick="tp_game()"/-->
	<?php endif; ?> 
</div>
<div class="content">
   	<!-- tab -->
    <ul class="tabflex">
       	<li><a href="schedule.php"><span>Schedule</span></a></li>
        <li><a href="inbox.php"><span>Message</span></a></li>
		<li><a href="profile.php" class="active"><span>Profile</span></a></li>
		<?php if ($this->_tpl_vars['is_coach'] == '1'): ?><li><a href="coach_game.php"><span>Coach</span></a></li><?php endif; ?>
		<?php if ($this->_tpl_vars['is_partner'] == '1'): ?><li><a href="training_partner_game.php"><span>Training Partner</span></a></li><?php endif; ?>
		<li><a href="cashier.php"><span>Cashier</a></li>
         
        </ul>
        <!-- tab -->
        <div class="clear"></div>
        <div class="tabular-content"> 
		<div class="total-message">&nbsp;&nbsp;</div>
		<div class="clear"></div>                     
        <div>
		<div class="register" style="margin-top: 20px">
		<div id='FormErrorMsg' style="color:red; text-align:center; padding-bottom:10px;"><?php if ($this->_tpl_vars['ermsg'] != ''): ?> <?php echo $this->_tpl_vars['ermsg'];  endif; ?> </div>
		<form name="editprofileForm" id="editprofileForm" enctype="multipart/form-data" method='post'>
			<input type="hidden" name="oldphoto" value="<?php echo $this->_tpl_vars['Formval']['photo']; ?>
">
			<input type="hidden" name="is_coach" id="is_coach" value="<?php echo $this->_tpl_vars['is_coach']; ?>
" />
			<input type="hidden" name="is_partner" id="is_partner" value="<?php echo $this->_tpl_vars['is_partner']; ?>
" />
			<input type="hidden" name="submitForm" value="submitForm" />
			<fieldset>
				<label>User ID :</label>
				<input name="name" id="name" type="text" value="<?php echo $this->_tpl_vars['Formval']['name']; ?>
" class="con-req" />
				<input type="hidden" name="user_type" id="user_type" value="<?php echo $this->_tpl_vars['user_type']; ?>
" />
				
				<p class="clear"></p>
				
				<?php if ($this->_tpl_vars['Formval']['photo'] != ''): ?><label>&nbsp; </label><img src="uploaded/user_images/thumbs/small_<?php echo $this->_tpl_vars['Formval']['photo']; ?>
">
				<p class="clear"></p>
				<br />
				<?php endif; ?>
				<label>Photo :</label>
				<input type="file" name="upload" id="Upload" accept="image/gif,image/jpeg,image/x-png" />
				&nbsp;&nbsp;
				
				
				<p class="clear"></p>
				
				<label>City :</label><div class="ausu-suggest">
				<input name="city" id="city" type="text" value="<?php echo $this->_tpl_vars['Formval']['city_name']; ?>
" class="con-req" autocomplete="off"/>
				<input name="cityid" id="cityid" type="hidden"  value="<?php echo $this->_tpl_vars['Formval']['city']; ?>
" autocomplete="off" />
				</div>
				<p class="clear"></p>
				<label>Skype Id :</label>
				<input name="skype_id" id="skype_id" type="text" value="<?php echo $this->_tpl_vars['Formval']['skype_id']; ?>
" />
				<label>Language :</label>
				<select id="s2" multiple="multiple" name="language[]" class="selectbox" style="height: 120px">
				<?php unset($this->_sections['lang']);
$this->_sections['lang']['name'] = 'lang';
$this->_sections['lang']['loop'] = is_array($_loop=$this->_tpl_vars['langArr']) ? count($_loop) : max(0, (int)$_loop); unset($_loop);
$this->_sections['lang']['show'] = true;
$this->_sections['lang']['max'] = $this->_sections['lang']['loop'];
$this->_sections['lang']['step'] = 1;
$this->_sections['lang']['start'] = $this->_sections['lang']['step'] > 0 ? 0 : $this->_sections['lang']['loop']-1;
if ($this->_sections['lang']['show']) {
    $this->_sections['lang']['total'] = $this->_sections['lang']['loop'];
    if ($this->_sections['lang']['total'] == 0)
        $this->_sections['lang']['show'] = false;
} else
    $this->_sections['lang']['total'] = 0;
if ($this->_sections['lang']['show']):

            for ($this->_sections['lang']['index'] = $this->_sections['lang']['start'], $this->_sections['lang']['iteration'] = 1;
                 $this->_sections['lang']['iteration'] <= $this->_sections['lang']['total'];
                 $this->_sections['lang']['index'] += $this->_sections['lang']['step'], $this->_sections['lang']['iteration']++):
$this->_sections['lang']['rownum'] = $this->_sections['lang']['iteration'];
$this->_sections['lang']['index_prev'] = $this->_sections['lang']['index'] - $this->_sections['lang']['step'];
$this->_sections['lang']['index_next'] = $this->_sections['lang']['index'] + $this->_sections['lang']['step'];
$this->_sections['lang']['first']      = ($this->_sections['lang']['iteration'] == 1);
$this->_sections['lang']['last']       = ($this->_sections['lang']['iteration'] == $this->_sections['lang']['total']);
?>
				 <option value="<?php echo $this->_tpl_vars['langArr'][$this->_sections['lang']['index']]['language_id']; ?>
" <?php if (in_array ( $this->_tpl_vars['langArr'][$this->_sections['lang']['index']]['language_id'] , $this->_tpl_vars['language_ids'] )): ?> selected="selected" <?php endif; ?>><?php echo $this->_tpl_vars['langArr'][$this->_sections['lang']['index']]['language_name']; ?>
</option>
				<?php endfor; endif; ?>
				</select>
			   
				<p class="clear"></p>
				<?php if ($this->_tpl_vars['is_coach'] == '1' || $this->_tpl_vars['is_partner'] == '1'): ?>
				 <label>Availability :</label>
				 <input type="checkbox" name="availability_type1" class='check' value="O" <?php if ($this->_tpl_vars['Formval']['availability_type1'] == 'O'): ?> checked="checked"<?php endif; ?> />
				 <label class='chklabel'>Online</label>
				 <input type="checkbox" name="availability_type2" class='check' id="avail_L" onclick="showhide_div()" value="L" <?php if ($this->_tpl_vars['Formval']['availability_type2'] == 'L'): ?> 
				 checked="checked"<?php endif; ?> /><label class='chklabel'>Local</label>
				<p class="clear"></p>
				
				<label id="avail_city" <?php if ($this->_tpl_vars['Formval']['availability_type2'] == 'L'): ?> <?php else: ?> style='display:none' <?php endif; ?>>Availability City :</label>
				<div class="ausu-suggest">
				<input name="availability_city" id="availability_city" type="text" value="<?php echo $this->_tpl_vars['Formval']['availabilitycity_name']; ?>
" class="con-req" 
				<?php if ($this->_tpl_vars['Formval']['availability_type2'] == 'L'): ?> <?php else: ?> style='display:none' <?php endif; ?>/>
				<input name="acityid" id="acityid" type="hidden"  value="<?php echo $this->_tpl_vars['Formval']['availability_city']; ?>
" autocomplete="off" />
				</div>
				
				
				<p class="clear"></p>
				<?php endif; ?>
				<?php if ($this->_tpl_vars['is_coach'] == '1'): ?>
				<label>Paypal Email ID :</label>
				<input name="paypal_email_id" id="paypal_email_id" type="text" value="<?php echo $this->_tpl_vars['Formval']['paypal_email_id']; ?>
" class="con-req" />
				<p class="clear"></p>
				<?php endif; ?>
				<?php if ($this->_tpl_vars['is_coach'] == '1' || $this->_tpl_vars['is_partner'] == '1'): ?>
				<label>About Me :</label>
					<textarea  name="description" id="description" onKeyDown="limitText(this.form.description,this.form.countdown,300);"
					onKeyUp="limitText(this.form.description,this.form.countdown,300);"><?php echo $this->_tpl_vars['Formval']['description']; ?>
</textarea>
					<p class="clear"></p>
					<label>Characters left </label><input readonly type="text" name="countdown" size="3" value="<?php echo $this->_tpl_vars['Formval']['char_left']; ?>
" class="tiny">
					<label></label>(Maximum characters: 300)
					<p class="clear"></p>
				<?php endif; ?>
				<p class="clear"></p>
				<label>&nbsp;</label>
				<!--<input name="submit" class="submit" value="Update" type="submit" onclick='return CheckFields()' />-->
				<a class="button" href="#" style="" onclick="return CheckFields()">Update</a>
				<a class="button" href="profile.php" style="" onclick="">Cancel</a>
				<!--<input name="" class="cancel" value="Cancel" type="button" onclick="window.location.href='profile.php'" />-->
			
			</fieldset>
		</form>
      </div>
	  <?php echo '
       <script type="text/javascript">
        
            //$("#s2").dropdownchecklist({ width: 150 });
            //$("#s4").dropdownchecklist({ maxDropHeight: 120 });
             <!-- AUTOCOMPLETE -->
			 $.fn.autosugguest({  
				   className: \'ausu-suggest\',
				  methodType: \'POST\',
					minChars: 2,
					  rtnIDs: true,
					dataFile: \'autocomplete.php?action=populateCity\'
			});
        
    </script>
	'; ?>

     <iframe width=132 height=142 name="gToday:contrast:agenda.js" id="gToday:contrast:agenda.js" src="sitemanager/DateRange/ipopeng.htm" scrolling="no" frameborder="0" style="visibility:visible; z-index:999; position:absolute; left:-300px; top:0px;"></iframe>  
      
     </div>
     </div>
    </div>